// src/api/order.js
import request from '@/utils/request.js';

// 获取所有购物历史记录
export const findAllShoppingHistories = (params) => {
    return request.get('/Order/findAll',{params});
}


//分页查询
export const orderListService = (params) => {
    return request.get('/Order/selectPage', { params });
}
//根据userid查询
export const findOrderByUserIdService = (params) => {
    return request.get('/Order/findByUserId', { params });
}


// 批量删除订单服务
export const batchDeleteOrderService = (ids) => {
    return request.delete('/Order/delete/batch', { data: ids })
  }


// 删除购物历史记录
export const deleteShoppingHistoryService = (id) => {
    return request.delete('/Order/delete?id='+id)
}

// 根据订单编号查询购物历史
export const findShoppingHistoryService = (ordersNumber) => {
    return request.get(`/Order/findByOrdersNumber?ordersNumber=`+ordersNumber);
}
